package com.xydtech.ecard.ftp.service;

import com.xydtech.ecard.ftp.domain.FtpDepositLoanAdjustmentConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: liliya
 * @Description: FTP内生性调整型参数配置表ftp_deposit_loan_adjustment_config
 * @Date: Created in 2023/8/16 16:31
 * @Modified:
 */

public interface IFtpDepositLoanAdjustmentConfigService {

    /**
     * 查询全表基础数据
     * @return
     */
    List<FtpDepositLoanAdjustmentConfig> selectBaseList(FtpDepositLoanAdjustmentConfig config);

    /**
     * 通过期限匹配法-期限流动性溢价调整项:定价期限(天数上限,闭区间)和config_key查对应区间
     * @param dictValue     sys_dict_data   repricing_frequency_type
     * @param dictType      sys_dict_data   12
     * @param unit          ftp_deposit_loan_adjustment_config  单位Y年
     * @param calcuDay      ftp_deposit_loan_adjustment_config的calcu_under_day与calcu_upper_day差值
     * @return
     */
    FtpDepositLoanAdjustmentConfig selectBaseListOfSysRelationUpperClose(String dictValue,
                                                                         String dictType,
                                                                         String unit,
                                                                         Integer calcuDay);


    FtpDepositLoanAdjustmentConfig selectBaseListOfSysRelationInfo(@Param("dictValue") String dictValue,
                                                                   @Param("dictType") String dictType,
                                                                   @Param("unit") String unit,
                                                                   @Param("originalDeadlineType") String originalDeadlineType);





    /**
     * 通过期限匹配法-结息频率调整项:定价期限(天数上限,闭区间)和config_key查对应区间
     * @param dictValue     sys_dict_data   repricing_frequency_type
     * @param dictType      sys_dict_data   1/3
     * @param unit          ftp_deposit_loan_adjustment_config  单位Y年
     * @param calcuDay      ftp_deposit_loan_adjustment_config的calcu_under_day与calcu_upper_day差值
     * @return
     */
    FtpDepositLoanAdjustmentConfig selectBaseListOfSysRelationUnderClose(String dictValue,
                                                                         String dictType,
                                                                         String unit,
                                                                         Integer calcuDay);

    /**
     * 查询
     */
    FtpDepositLoanAdjustmentConfig selectBaseById(Integer id);

    /**
     * 新增
     */
    int insertBase(FtpDepositLoanAdjustmentConfig config);

    /**
     * 修改
     */
    int updateBase(FtpDepositLoanAdjustmentConfig config);

    /**
     * 删除单条
     */
    int deleteBaseById(Long configId);

    /**
     * 批量删除
     */
    int deleteBaseByIds(Long[] configIds);




}
